package com.example.sunmiv1.entity;

import android.text.TextUtils;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

public class StoreRetreatOrderDetailsBean {

    /**
     * data : [{"id":"61","merchant_id":"1","store_id":"1","retreat_order_id":"24","warehouse_id":"7","supplier_id":"1217","goods_class_id":"514","goods_id":"2312","sku_id":"0","goods_name":"1","sku_name":"","sku_id_list":"","goods_number":"1234","sku_goods_number":"","goods_code":"1234","sku_code":"","company":"","attribute_state":"1","pricing_method":"1","purchase_price":2,"retreat_price":2,"sku_num":1,"retreat_num":1,"subtotal":2,"remarks":"","order_number":"ST201911130024","purchase_order_number":"SC201911130056","add_time":"1573631996","totalInfo":"2 * 1 = 2","difference_money":0}]
     * status : 1
     */

    private int status;
    private List<DataBean> data;

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public List<DataBean> getData() {
        return data;
    }

    public void setData(List<DataBean> data) {
        this.data = data;
    }

    public static class DataBean {
        /**
         * id : 61
         * merchant_id : 1
         * store_id : 1
         * retreat_order_id : 24
         * warehouse_id : 7
         * supplier_id : 1217
         * goods_class_id : 514
         * goods_id : 2312
         * sku_id : 0
         * goods_name : 1     // 商品名稱  2
         * sku_name :         //  規格
         * sku_id_list :
         * goods_number : 1234    // 貨號  4
         * sku_goods_number :
         * goods_code : 1234      //  條碼  3
         * sku_code :
         * company :               //  單位  5
         * attribute_state : 1
         * pricing_method : 1
         * purchase_price : 2       //   原採購價   7
         * retreat_price : 2        //   退貨價     8
         * sku_num : 1
         * retreat_num : 1          //   數量     6
         * subtotal : 2
         * remarks :
         * order_number : ST201911130024
         * purchase_order_number : SC201911130056  // 採購單號   1
         * add_time : 1573631996
         * totalInfo : 2 * 1 = 2
         * difference_money : 0       //  盈虧金額   9
         */

        private String id;
        private String merchant_id;
        private String store_id;
        private String retreat_order_id;
        private String warehouse_id;
        private String supplier_id;
        private String goods_class_id;
        private String goods_id;
        private String sku_id;
        private String goods_name;
        private String sku_name;
        private String sku_id_list;
        private String goods_number;
        private String sku_goods_number;
        private String goods_code;
        private String sku_code;
        private String company;
        private String attribute_state;
        private String pricing_method;
        private double purchase_price;
        private double retreat_price;
        private double sku_num;
        private double retreat_num;
        private double subtotal;
        private String remarks;
        private String order_number;
        private String purchase_order_number;
        private String add_time;
        private String totalInfo;
        private double difference_money;

        private String build_date;
        private String quality_guarantee_period;
        private String serial_number_state;

        public String getSerial_number_state() {
            return serial_number_state == null ? "" : serial_number_state;
        }

        public void setSerial_number_state(String serial_number_state) {
            this.serial_number_state = serial_number_state;
        }

        public String getBuild_date() {
            if (build_date == null) {
                return "";
            }
            if (build_date.indexOf("-") != -1) {
                return build_date;
            } else {
                String a = build_date == null ? "" : build_date + "000";
                SimpleDateFormat time = new SimpleDateFormat("yyyy年MM月dd日");
                if (TextUtils.isEmpty(a) || TextUtils.isEmpty(build_date)) {
                    return "";
                } else {
                    return time.format(new Date(Long.parseLong(a)));
                }
            }
        }

        public void setBuild_date(String build_date) {
            this.build_date = build_date;
        }

        public String getQuality_guarantee_period() {
            String a = quality_guarantee_period == null ? "" : quality_guarantee_period;
            return a;
        }

        public void setQuality_guarantee_period(String quality_guarantee_period) {
            this.quality_guarantee_period = quality_guarantee_period;
        }

        public String getId() {
            return id == null ? "" : id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getMerchant_id() {
            return merchant_id == null ? "" : merchant_id;
        }

        public void setMerchant_id(String merchant_id) {
            this.merchant_id = merchant_id;
        }

        public String getStore_id() {
            return store_id == null ? "" : store_id;
        }

        public void setStore_id(String store_id) {
            this.store_id = store_id;
        }

        public String getRetreat_order_id() {
            return retreat_order_id == null ? "" : retreat_order_id;
        }

        public void setRetreat_order_id(String retreat_order_id) {
            this.retreat_order_id = retreat_order_id;
        }

        public String getWarehouse_id() {
            return warehouse_id == null ? "" : warehouse_id;
        }

        public void setWarehouse_id(String warehouse_id) {
            this.warehouse_id = warehouse_id;
        }

        public String getSupplier_id() {
            return supplier_id == null ? "" : supplier_id;
        }

        public void setSupplier_id(String supplier_id) {
            this.supplier_id = supplier_id;
        }

        public String getGoods_class_id() {
            return goods_class_id == null ? "" : goods_class_id;
        }

        public void setGoods_class_id(String goods_class_id) {
            this.goods_class_id = goods_class_id;
        }

        public String getGoods_id() {
            return goods_id == null ? "" : goods_id;
        }

        public void setGoods_id(String goods_id) {
            this.goods_id = goods_id;
        }

        public String getSku_id() {
            return sku_id == null ? "" : sku_id;
        }

        public void setSku_id(String sku_id) {
            this.sku_id = sku_id;
        }

        public String getGoods_name() {
            return goods_name == null ? "" : goods_name;
        }

        public void setGoods_name(String goods_name) {
            this.goods_name = goods_name;
        }

        public String getSku_name() {
            return sku_name == null ? "" : sku_name;
        }

        public void setSku_name(String sku_name) {
            this.sku_name = sku_name;
        }

        public String getSku_id_list() {
            return sku_id_list == null ? "" : sku_id_list;
        }

        public void setSku_id_list(String sku_id_list) {
            this.sku_id_list = sku_id_list;
        }

        public String getGoods_number() {
            return goods_number == null ? "" : goods_number;
        }

        public void setGoods_number(String goods_number) {
            this.goods_number = goods_number;
        }

        public String getSku_goods_number() {
            return sku_goods_number == null ? "" : sku_goods_number;
        }

        public void setSku_goods_number(String sku_goods_number) {
            this.sku_goods_number = sku_goods_number;
        }

        public String getGoods_code() {
            return goods_code == null ? "" : goods_code;
        }

        public void setGoods_code(String goods_code) {
            this.goods_code = goods_code;
        }

        public String getSku_code() {
            return sku_code == null ? "" : sku_code;
        }

        public void setSku_code(String sku_code) {
            this.sku_code = sku_code;
        }

        public String getCompany() {
            return company == null ? "" : company;
        }

        public void setCompany(String company) {
            this.company = company;
        }

        public String getAttribute_state() {
            return attribute_state == null ? "" : attribute_state;
        }

        public void setAttribute_state(String attribute_state) {
            this.attribute_state = attribute_state;
        }

        public String getPricing_method() {
            return pricing_method == null ? "" : pricing_method;
        }

        public void setPricing_method(String pricing_method) {
            this.pricing_method = pricing_method;
        }

        public double getPurchase_price() {
            return purchase_price;
        }

        public void setPurchase_price(double purchase_price) {
            this.purchase_price = purchase_price;
        }

        public double getRetreat_price() {
            return retreat_price;
        }

        public void setRetreat_price(double retreat_price) {
            this.retreat_price = retreat_price;
        }

        public double getSku_num() {
            return sku_num;
        }

        public void setSku_num(double sku_num) {
            this.sku_num = sku_num;
        }

        public double getRetreat_num() {
            return retreat_num;
        }

        public void setRetreat_num(double retreat_num) {
            this.retreat_num = retreat_num;
        }

        public double getSubtotal() {
            return subtotal;
        }

        public void setSubtotal(double subtotal) {
            this.subtotal = subtotal;
        }

        public String getRemarks() {
            return remarks == null ? "" : remarks;
        }

        public void setRemarks(String remarks) {
            this.remarks = remarks;
        }

        public String getOrder_number() {
            return order_number == null ? "" : order_number;
        }

        public void setOrder_number(String order_number) {
            this.order_number = order_number;
        }

        public String getPurchase_order_number() {
            return purchase_order_number == null ? "" : purchase_order_number;
        }

        public void setPurchase_order_number(String purchase_order_number) {
            this.purchase_order_number = purchase_order_number;
        }

        public String getAdd_time() {
            return add_time == null ? "" : add_time;
        }

        public void setAdd_time(String add_time) {
            this.add_time = add_time;
        }

        public String getTotalInfo() {
            return totalInfo == null ? "" : totalInfo;
        }

        public void setTotalInfo(String totalInfo) {
            this.totalInfo = totalInfo;
        }

        public double getDifference_money() {
            return difference_money;
        }

        public void setDifference_money(double difference_money) {
            this.difference_money = difference_money;
        }
    }
}
